Warnings for pattern matching

نویسنده

  • Luc Maranget
چکیده

We examine the ML pattern-matching anomalies of useless clauses and non-exhaustive matches. We state the definition of these anomalies, building upon pattern matching semantics, and propose a simple algorithm to detect them. We have integrated the algorithm in the Objective Caml compiler, but we show that the same algorithm is also usable in a non-strict language such as Haskell. Or-patterns are considered for both strict and nonstrict languages.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Local Derivative Pattern with Smart Thresholding: Local Composition Derivative Pattern for Palmprint Matching

Palmprint recognition is a new biometrics system based on physiological characteristics of the palmprint, which includes rich, stable, and unique features such as lines, points, and texture. Texture is one of the most important features extracted from low resolution images. In this paper, a new local descriptor, Local Composition Derivative Pattern (LCDP) is proposed to extract smartly stronger...

متن کامل

Influence of health warnings on the use of rosiglitazone and pioglitazone in an area of Spain: A time-series study

BACKGROUND Throughout 2007 and January 2008, several glitazones health warnings were published on rosiglitazone myocardial infarction risk. The impact of such warnings on glitazones prevalence of utilization has been extensively studied in the United States but only in one European country (England), which has showed different pattern from US studies. The aim of this study is to evaluate the im...

متن کامل

MELT - a Translated Domain Specific Language Embedded in the GCC Compiler

The GCC free compiler is a very large software, compiling source in several languages for many targets on various systems. It can be extended by plugins, which may take advantage of its power to provide extra specific functionality (warnings, optimizations, source refactoring or navigation) by processing various GCC internal representations (Gimple, Tree, ...). Writing plugins in C is a complex...

متن کامل

Embedded in the GCC Compiler

The GCC free compiler is a very large software, compiling source in several languages for many targets on various systems. It can be extended by plugins, which may take advantage of its power to provide extra specific functionality (warnings, optimizations, source refactoring or navigation) by processing various GCC internal representations (Gimple, Tree, ...). Writing plugins in C is a complex...

متن کامل

GADTs and Exhaustiveness: Looking for the Impossible

Sound exhaustiveness checking of pattern-matching is an essential feature of GADTs, and OCaml has supported it from day one, by showing that the remaining cases could never be typed [1]. Not only does it allow the programmer to be confident in the soundness of his code, but it also permits optimizations which make GADTs more efficient. However, while this approach is sound and can prune some si...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Funct. Program.

دوره 17  شماره 

صفحات  -

تاریخ انتشار 2007